import { mockGetChildren, mockGetLarkBlocks, mockGetLarkChildren } from '../mock-data';

export const noteMock = [
  {
    url: /\/cn-knowledge\/notebook\/[^/]+\/lark-blocks/,
    method: 'post',
    response: (): Array<note.CnBlock> => {
      return mockGetLarkBlocks['G6p2d9F77opgYrxnQtScw61Dnlg'] ?? [];
    },
  },
  {
    url: /\/cn-knowledge\/notebook\/[^/]+\/notes/,
    method: 'post',
    response: (): Array<note.Note> => {
      return mockGetChildren[-1] ?? [];
    },
  },
  {
    url: /\/cn-knowledge\/notebook\/[^/]+\/lark-notes/,
    method: 'post',
    response: (): note.LarkFilePage => {
      return mockGetLarkChildren['fldcnulOOV4WSf3e3uKMlpG3UnG'] ?? {};
    },
  },
];
